package com.flyme.module.base.provider.service.impl;

import com.flyme.common.core.model.query.CriteriaQuery;
import com.flyme.core.base.supper.entity.EntityMap;
import com.flyme.core.base.supper.service.impl.BaseServiceImpl;
import com.flyme.module.base.client.entity.SysContinuecourse;
import com.flyme.module.base.provider.mapper.SysContinuecourseMapper;
import com.flyme.module.base.provider.service.SysContinuecourseService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysContinuecourseServiceImpl extends BaseServiceImpl<SysContinuecourseMapper, SysContinuecourse> implements SysContinuecourseService {
    @Override
    public List<EntityMap> getStudyConfugCourse(Long certificateId) {
        CriteriaQuery queryWrapper = new CriteriaQuery<EntityMap>();
        queryWrapper.select("*");
        queryWrapper.eq("certificateId",certificateId);
        return listEntityMaps(queryWrapper);
    }

    @Override
    public EntityMap getConfugCourse(Long courseId,Long certifiId) {
        CriteriaQuery<EntityMap> qw=new CriteriaQuery();
        qw.select("*");
        qw.eq("courseId",courseId);
        qw.eq("certificateId",certifiId);
        return  getEntityMap(qw);
    }
}
